
package com.github.tzraeq.d2d;

import com.facebook.react.ReactPackage;
import com.facebook.react.bridge.JavaScriptModule;
import com.facebook.react.bridge.NativeModule;
import com.facebook.react.bridge.ReactApplicationContext;
import com.facebook.react.uimanager.ViewManager;

import java.util.Arrays;
import java.util.Collections;
import java.util.List;
public class RND2dPackage implements ReactPackage {

    private RND2dPlayerManager rnd2dPlayerManager;
    private RND2dModule rnd2dModule;
    public RND2dPackage() {
        rnd2dPlayerManager = new RND2dPlayerManager();
    }

    @Override
    public List<NativeModule> createNativeModules(ReactApplicationContext reactContext) {
        rnd2dModule = new RND2dModule(reactContext,rnd2dPlayerManager);
        return Collections.<NativeModule>singletonList(rnd2dModule);
    }

    // Deprecated from RN 0.47
    public List<Class<? extends JavaScriptModule>> createJSModules() {
      return Collections.emptyList();
    }

    @Override
    public List<ViewManager> createViewManagers(ReactApplicationContext reactContext) {
        return Collections.<ViewManager>singletonList(rnd2dPlayerManager);
    }
}